<div class="window">
  <div class="login-div">
    <form (ngSubmit)="submitForm()" [formGroup]="validateForm" class="login-form" nz-form>
      <!-- 用户名 -->
      <nz-form-item>
        <nz-form-control nzErrorTip="Please input your username!">
          <nz-input-group nzPrefixIcon="user">
            <input formControlName="username" nz-input placeholder="Username" type="text"/>
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <!-- 密码 -->
      <nz-form-item>
        <nz-form-control nzErrorTip="Please input your Password!">
          <nz-input-group nzPrefixIcon="lock">
            <input formControlName="password" nz-input placeholder="Password" type="password"/>
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <!-- 权限口令 -->
      <nz-form-item *ngIf="showOtherToken">
        <nz-form-control>
          <nz-input-group nzPrefixIcon="lock">
            <input formControlName="token" nz-input placeholder="AuthToken; not required" type="token"/>
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <!-- 是否显示口令 -->
      <div class="login-form-margin" nz-row>
        <div [nzSpan]="12" nz-col>
          <label formControlName="remember" nz-checkbox (ngModelChange)="tokenInputChange()">
            <span>使用口令</span>
          </label>
        </div>
        <div [nzSpan]="12" nz-col>
          <a class="login-form-forgot">忘记密码</a>
        </div>
      </div>
      <button [nzType]="'primary'" [nzLoading]="submitLoading"
              class="login-form-button login-form-margin" nz-button>
        {{buttonTitle()}}
      </button>
      或者
      <a routerLink="{{elseRouteLink()}}">{{elseTitle()}}</a>
    </form>
  </div>
</div>
